<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title th:text="${problem.title}"></title>
</head>
<body>
<div th:if="${iscontest eq true}"><h2 th:text="${contest.title}"></h2></div>
<H3 th:text="${problem.title}"></H3>
<p th:utext="${problem.description}"></p>
<h4>输入描述：</h4>
<p th:utext="${problem.input_description}"></p>
<h4>输出描述：</h4>
<p th:utext="${problem.output_description}"></p>
<button th:if="${iscontest eq false}" th:onclick="@{'window.open(\''+'/api/record/add?problemid='+${problem.problemid}+'\')'}">提交</button>
<!--<button th:if="${iscontest eq true}" th:onclick="@{'window.open(\''+'/api/record/add?problemid='+${problem.problemid}+'&contestid='+${contest.contestid}+'\')'}">提交</button>-->

<!--<a th:if="${iscontest eq false}" target="_blank" th:href="${'/solution/list/problem/'+problem.problemid+'?page=0'}">题解</a>-->
<a th:if="${iscontest eq false}" target="_blank" th:href="${'/record/list?problemid='+problem.problemid+'&page=0'}">提交记录</a>
<!--<a th:if="${iscontest eq true}" target="_blank" th:href="${'/contest/'+contest.contestid+'/record/list?problemid='+problem.problemid+'&page=0'}">提交记录</a>-->
<div th:if="${iscontest eq false}"><a th:if="${isAdmin eq 'YES'}" href="/adminhomepage">主页</a>
    <a th:if="${isAdmin eq 'NO'}" href="/userhomepage">主页</a>
</div>

</body>
</html>